<template>
    <div>
        <p @click="emitFn">我是son1组件</p>
    </div>
</template>

<script>
// 中央事件总线 new Vue()
import eventBus from './eventbus'
export default {
    data() {
        return {
            girlStarArr: [
                '古力娜扎',
                '迪丽热巴',
                '佟丽娅',
                '哈妮克孜'
            ],
        }
    },
    methods: {
        emitFn() {
            console.log('123');
            eventBus.emit('myevent', this.girlStarArr)
        }
    }
}
</script>
<style scoped></style>